package t20230608;

import java.util.*;

/**
 * @Author: DengJia
 * @Date: 2023/6/8
 * @Description:
 */

public class New {
    public static <K, V> Map<K, V> map() {
        return new HashMap<K, V>();
    }

    public static <T> List<T> list(){
        return new ArrayList<T>();
    }

    public static <T> LinkedList<T> lList() {
        return new LinkedList<T>();
    }

    public static <T> Set<T> set() {
        return new HashSet<T>();
    }

    public static <T> Queue<T> queue() {
        return new LinkedList<T>();
    }

    public static void main(String[] args) {
        Map<String, List<String>> map = New.map();
        List<String> list = New.list();
        LinkedList<String> objects = New.lList();
        Set<String> set = New.set();
        Queue<String> queue = New.queue();
    }
}

class LimitsOfInterface {
    static void f(Map<String, List<String>> map) {
        System.out.println(map.getClass().getSimpleName());
    }

    public static void main(String[] args) {
        f(New.map());
    }
}

